<span class="account_orders_header_right">
    Questions?
    <a href="/contact/">Contact Us</a>
</span>
<div style="clear: both"></div>
</div>
<div class="account_main_text_content">
    <?php
    if(isset($orders)){
    foreach ($orders as $order){
        $key=rand(1000,9999);$key2=rand(100,999);
        echo'<a href="/account/order/'.$key.$order['id'].$key2.'">ID: '.$order['id'].' Date:'.$order['dateTimeAdded'].'</a><br />';
    }}
    ?>
</div>